package com.iflytek.cosmo.ocr.common.core.task;

import com.iflytek.cosmo.ocr.model.domain.FileInfo;
import org.springframework.web.multipart.MultipartFile;

import java.io.OutputStream;

/**
 *识别任务
 */
public class RecognizedTask{
    private String userId;
    private String dirId;
    private MultipartFile multipartFileList;
    private  String ip;
    private OutputStream imageOutputStream;
    private FileInfo fileInfo;
    private  int index;
    private  String fileType;

    public String getFileType() {
        return fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    /**
     *
     * @return
     */
    public  boolean isPdf()
    {
        if("pdf".equalsIgnoreCase(this.getFileType()))
        {
            return true;
        }
        return  false;
    }

    public OutputStream getImageOutputStream() {
        return imageOutputStream;
    }

    public void setImageOutputStream(OutputStream imageOutputStream) {
        this.imageOutputStream = imageOutputStream;
    }

    /**
     * 父文件
     */
    private FileInfo parentFileInfo;

    public FileInfo getParentFileInfo() {
        return parentFileInfo;
    }

    public void setParentFileInfo(FileInfo parentFileInfo) {
        this.parentFileInfo = parentFileInfo;
    }

    public void setFileInfo(FileInfo fileInfo) {
        this.fileInfo = fileInfo;
    }

    public FileInfo getFileInfo() {
        return fileInfo;
    }

    public void setDirId(String dirId) {
        this.dirId = dirId;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setMultipartFileList(MultipartFile multipartFileList) {
        this.multipartFileList = multipartFileList;
    }

    public String getDirId() {
        return dirId;
    }

    public MultipartFile getMultipartFileList() {
        return multipartFileList;
    }

    public String getIp() {
        return ip;
    }

    public String getUserId() {
        return userId;
    }
}
